<template>
  <div class="tab">
    <router-link tag="div" class="tab-item" to="/recommend">
      <span class="tab-link">推荐</span>
    </router-link>
    <router-link tag="div" class="tab-item" to="/singer">
      <span class="tab-link">歌手</span>
    </router-link>
    <router-link tag="div" class="tab-item" to="/rank">
      <span class="tab-link">排行</span>
    </router-link>
    <router-link tag="div" class="tab-item" to="/search">
      <span class="tab-link">搜索</span>
    </router-link>
  </div>
</template>

<script>
export default {
  name: 'tab'
}
</script>
<style lang="less" scoped>
.tab {
  display: flex;
  justify-content: space-around;
  height: 44px;
  line-height: 44px;
  .tab-item {
    font-size: 14px;
    color: #fff;
    .tab-link {
      padding-bottom: 5px;
    }
    &.router-link-active {
      //表示router-link激活选中时的状态
      .tab-link {
        color: rgb(245, 202, 62);
        border-bottom: 2px solid rgb(245, 202, 62);
      }
    }
  }
}
</style>
